<template>
  <view class="container"></view>
</template>

<script>
import { autoLogin } from "@/api/user";
export default {
  data() {
    return {
      url: "",
    };
  },
  onLoad(options) {
    const loginCode = options.loginCode;
    const operate = options.operate
    uni.setStorageSync('queryParamCatch', options);
    autoLogin({ loginCode })
      .then((res) => {
        // 续租
        if (operate == 'renewed') {
          uni.reLaunch({
            url: `/pages/renewed?orderId=${options.orderId}&channelOrderCode=${options.channelOrderCode}`,
          });
        } else {
          uni.reLaunch({
            url: `/pages/selectModel`
          });
        }
      })
      .catch((err) => {
        console.log(err);
      });
  },

  methods: {},
};
</script>

<style lang="scss" scoped></style>
